import { createApp } from 'vue'
import './style.css'
import './style/base.scss'
import './style/iconfont.css'
import App from './App.vue'
import { createPinia } from 'pinia'
import { createRouter, createWebHashHistory } from 'vue-router'
const router = createRouter({
   history: createWebHashHistory(),
   routes: [
      {
         path: '/',
         component: () => import('./views/LayoutView.vue'),
         redirect:'home',
         children: [
            {
               path: 'home',
               component: () => import('./views/HomeView.vue')
            },
            {
               path: 'cart',
               component: () => import('./views/CartView.vue')
            },
            {
               path: 'order',
               component: () => import('./views/OrderView.vue')

            },
            {
               path: 'my',
               component: () => import('./views/MyView.vue')
            },
         ]
      },
      {
         path: '/shopview',
         component: () => import('./views/ShopView.vue')
      },
      {
         path: '/addressview',
         component: () => import('./views/AddressView.vue')
      },
      {
         path: '/createaddressview',
         component: () => import('./views/CreateAddressView.vue')
      },
      {
         path: '/addresscard',
         component: () => import('./components/AddressCard.vue')
      }, {
         path: '/orderconfirmationview',
         component: () => import('./views/OrderConfirmationView.vue')
      }, {
         path: '/orderCard',
         component: () => import('./components/OrderCard.vue'),
         redirect:'/order'
      }
   ]
})
createApp(App).use(createPinia()).use(router).mount('#app')
